package com.ourteam.product.requirement.api;

import com.ourteam.frame.web.AbstractSearchModel;
import com.ourteam.product.requirement.dao.ProductGlossaryRelateDAOQueryBean;
import com.ourteam.product.requirement.domain.ProductGlossaryRelateBean;

public class ProductGlossaryRelateSearchModel extends AbstractSearchModel<ProductGlossaryRelateDAOQueryBean> {

	private long productGlossaryId;

	public long getProductGlossaryId() {
		return productGlossaryId;
	}

	public void setProductGlossaryId(long productGlossaryId) {
		this.productGlossaryId = productGlossaryId;
	}

	@Override
	public String getMappedDAOField(String aProperty) {
		return ProductGlossaryRelateBean.getMappedDAOField(aProperty);
	}

	@Override
	protected void doBuildQueryBean(ProductGlossaryRelateDAOQueryBean queryBean) throws Exception {

		ProductGlossaryRelateDAOQueryBean.Criteria criteria = queryBean.createCriteria();

		if (productGlossaryId != 0) {
			criteria.andProductGlossaryIdEqualTo(productGlossaryId);
		}

	}

}
